home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / VIS082S.ARJ / GAMBLE.PAS < prev    next >
Pascal/Delphi Source File  |  1991-03-30  |  22KB  |  706 lines

  1. {$R-,S-,I-,D-,F+,V-,B-,N-,O+,E+ }
  2. {$M 65500,0,0 }
  3.  
  4. unit gamble;
  5.  
  6. interface
  7.  
  8. uses crt,dos,overlay,
  9.      gentypes,configrt,modem,statret,gensubs,subs1,subs2,userret;
  10.  
  11.  
  12. const
  13.                                         {Definitions of Constants}
  14.        perinc     :real=10;             {Percent of Increase in RR}
  15. var
  16.    Credits      :longint;
  17.    yn           :string;
  18.    randcha2     :byte;
  19.    randchar     :byte;
  20.    intcred      :byte;
  21.    bet          :word;
  22.    command1     :word;
  23.    curthrow     :byte;
  24.    pig          :integer;
  25.    pgir         :integer;
  26.    win          :boolean;
  27.    black        :boolean;
  28.    red          :boolean;
  29.    one          :boolean;
  30.    loop         :byte;
  31.    casechar     :char;
  32.    done,finished :Boolean;
  33.  
  34. procedure game;
  35.  
  36. implementation
  37.  
  38.   Procedure ansicls;
  39.     Begin
  40.   if vt52 in urec.config then begin
  41.    wvt52(#234+#234+#04);
  42.    clrscr;
  43.     end else
  44.      Write(direct,#27'[2J')
  45.     End;
  46.  
  47. procedure game;
  48.  
  49. {Procedures for procedural usage -- GLOBAL}
  50.  
  51. Function capfir(inString:STRING):STRING;
  52.  begin
  53.    capfir:=upcase(inString[1]);
  54.  end;
  55.  
  56. Procedure InitVar;
  57.  begin
  58.    yn:='';
  59.    randcha2:=0;
  60.    randchar:=0;
  61.    intcred:=0;
  62.    bet:=0;
  63.    command1:=0;
  64.    curthrow:=0;
  65.    pig:=0;
  66.    pgir:=0;
  67.    win:=false;
  68.    black:=false;
  69.    red:=false;
  70.    one:=false;
  71.    loop:=0;
  72.  end;
  73.  
  74. Procedure lame;
  75.  begin
  76.   WriteLn(^R'Gee dude...were did you learn math?');
  77.  end;
  78.  
  79. Procedure exitconvert;
  80.  begin
  81.   WriteLn(^R'Your '^P'['^S,credits,^P']'^R' credits have been converted into '+
  82.    ^P'['^S,trunc(credits/configset.convrate),^P']'^R' file points.');
  83.   urec.udpoints:=trunc(urec.udpoints+(credits/configset.convrate));
  84.   credits:=0
  85.  end;
  86.  
  87.   procedure wingame;
  88.   begin
  89.        writeln;
  90.        write ('We have a WINNER!'^G^G);
  91.        writeln;
  92.        if one then command1:=command1*38;
  93.        writeln (^R'You won '^P'['^S,command1,^P']'^R' credits.');
  94.        credits:=credits+command1;
  95.        writeln ('You now have '^P'['^S,credits,^P']'^R' credits.');
  96.   end;
  97.  
  98. Procedure Roulette;
  99.   Function RandBoolean:boolean;
  100.    begin
  101.       RandBoolean:=boolean(random(2));
  102.    end;
  103.  
  104.   procedure loseroul;
  105.   begin
  106.    writeln ('Sorry, You lose!');
  107.    credits:=credits-command1;
  108.    writeln ('You have '^P'['^S,credits,^P']'^R' credits left.');
  109.   end;
  110.  
  111.   procedure playroul;
  112.   begin
  113.     ANSiCLS;
  114.     write (^R'Spinning the wheel'^P'.');
  115.     for loop:=1 to 3 do
  116.     begin
  117.      write('.');
  118.      delay (200);
  119.     end;
  120.     write (^R'Tossing the ball'^P'.');
  121.     for loop:=1 to 4 do
  122.     begin
  123.      write('.');
  124.      delay(200);
  125.     end;
  126.     write (^R'Slowing down'^P'.');
  127.     for loop:=1 to 5 do
  128.     begin
  129.      write('.');
  130.      delay(100);
  131.     end;
  132.     write (^R'It is ');
  133.  
  134.     randchar:=random(38)+1;
  135.     write (^P'['^S,randchar,^P']'^R'-'^S);
  136.     if RandBoolean=true then
  137.      begin
  138.       writeln (^P'['^S'black.'^P']'^R);
  139.       win:=true;
  140.      end
  141.     else
  142.      begin
  143.       writeln (^P'['^S'red.'^P']'^R);
  144.       win:=false;
  145.      end;
  146.       if black then
  147.     begin
  148.        if win then wingame else loseroul;
  149.     end;
  150.     if red then begin
  151.        if win then loseroul else wingame;
  152.     end;
  153.     if one then if randchar=pig then wingame else loseroul;
  154.  end;
  155.  
  156.   procedure playroulette;
  157.   begin
  158.         writestr (^M^R'How many credits do you wish to bet '^P'['^S+strr(credits)+^R' max'^P']'^R': *');
  159.         if length(input)=0 then exit;
  160.         command1:=valu(input);
  161.         if command1<0 then exit;
  162.         if command1>credits then begin
  163.           lame;
  164.           exit;
  165.         end;
  166.         writeln (^M^M^R'You can bet on',
  167.                    ^M,'  '^S'1'^R' One Number    ['^S'38'^R' to'^S' 1'^R']',
  168.                    ^M,'  '^S'2'^R' Red Numbers   ['^S'2'^R' to'^S' 1'^R']',
  169.                    ^M,'  '^S'3'^R' Black Numbers ['^S'2'^R' to'^S' 1'^R']',
  170.                    ^M,'  '^S'4'^R' New Bet',
  171.                    ^M,'  '^S'Q'^R' Quit');
  172.         writestr ('Your choice: *');
  173.         casechar:=upcase(input[1]);
  174.         case casechar of
  175.           '1':begin
  176.                 repeat
  177.                  writestr (^R'Which number to bet on '^P'['^S'1'^R'-'^S'38'^P']'^R': &');
  178.                  pig:=valu(input);
  179.                 until (pig in [1..38]) or hungupon;
  180.                 red:=false;
  181.                 black:=false;
  182.                 one:=true;
  183.                 playroul;
  184.                 writestr (^M^R'Would you like to play again '^P'['^S'y'^R'/'^S'n'^P']'^R'? *');
  185.                 if yes then playroulette;
  186.               end;
  187.           '2':begin
  188.                 red:=true;
  189.                 black:=false;
  190.                 one:=false;
  191.                 playroul;
  192.                 writestr (^M^R'Would you like to play again '^P'['^S'y'^R'/'^S'n'^P']'^R'? *');
  193.                 if yes then playroulette;
  194.               end;
  195.           '3':begin
  196.                 black:=true;
  197.                 one:=false;
  198.                 red:=false;
  199.                 playroul;
  200.                 writestr (^M^R'Would you like to play again '^P'['^S'y'^R'/'^S'n'^P']'^R'? *');
  201.                 if yes then playroulette;
  202.               end;
  203.           '4':begin
  204.                 playroulette;
  205.               end;
  206.           'Q':begin
  207.                 exit;
  208.               end;
  209.         end;
  210. end;
  211.   begin
  212.    playroulette;
  213.   end;
  214. Procedure hilo;
  215.  
  216.   procedure losehilo;
  217.   begin
  218.       writestr (^R'Sorry, you lose...');
  219.       credits:=credits-bet;
  220.       writestr (^R'You now have '^S+strr(credits)+^R' credits left.');
  221.   end;
  222.  
  223.   procedure playhilo;
  224.   begin
  225.        writeln;
  226.        writestr (^R'Do you need instructions '^P'['^S'y'^R'/'^S'n'^P']'^R'? *');
  227.        if yes then
  228.          writestr (^M'You get six guesses to guess a number between 1 and 100.'+
  229.                   ^M+'After the sixth guess you lose, or if you have guessed it'+
  230.                   ^M+'then you win.');
  231.        writeln;
  232.        writestr (^R'Please enter number of credits to bet '^P'['^S+strr(credits)+^R' max'^P']'^R': *');
  233.        bet:=valu(input);
  234.        if bet<0 then exit;
  235.        if bet>credits then begin
  236.          lame;
  237.          exit;
  238.        end;
  239.        win:=false;
  240.        randchar:=random(100)+1;
  241.        for loop:=1 to 6 do begin
  242.          writestr (^R'Guess #'^S+strr(loop)+^R'? *');
  243.          pig:=valu(input);
  244.          if pig>100 then loop:=loop-1;
  245.          if pig<1 then loop:=loop-1;
  246.          if (pig=randchar) then win:=true;
  247.          if (pig>randchar) then writeln (^S'Too high'^R'..');
  248.          if (pig<randchar) then writeln (^S'Too low'^R'...');
  249.          if win then begin
  250.          command1:=bet;
  251.          wingame;
  252.          loop:=6;
  253.          exit;
  254.          end;
  255.          if (loop=6) and (not win) then losehilo;
  256.          writeln;
  257.        end;
  258.        writestr (^M^R'Would you like to play again '^P'['^S'y'^R'/'^S'n'^P']'^R'? *');
  259.        if yes then playhilo;
  260.   end;
  261.   begin
  262.   playhilo;
  263.   end;
  264.  
  265.  
  266. Procedure bank;
  267. Procedure Getcredits;
  268.  begin
  269.   Write('You have '^P'['^S,urec.udpoints,^P']'^R' points.  How many do you wish to convert: ');
  270.   WriteStr('*');
  271.   if (valu(input)<urec.udpoints){ and (valu(input)>0) Intentional error} then
  272.    begin
  273.       urec.udpoints:=urec.udpoints-valu(input);
  274.       credits:=credits+(valu(input)*configset.convrate);
  275.       WriteLn('You now have '^P'['^S,credits,^P']'^R' credits and '^P'['^S,urec.udpoints,^P']'^R' points.');
  276.    end;
  277.   end;
  278.  
  279. Procedure getpoints;
  280.  begin
  281.   Write('You have '^P'['^S,credits,^P']'^R' credits.  How man do you wish to convert: ');
  282.   WriteStr('*');
  283.   if (valu(input)<credits) and (valu(input)>0) then
  284.    begin
  285.       credits:=credits-valu(input);
  286.       urec.udpoints:=trunc(urec.udpoints+(valu(input)/configset.convrate));
  287.       WriteLn('You now have '^P'['^S,credits,^P']'^R' credits and '^P'['^S,urec.udpoints,^P']'^R' points.');
  288.    end;
  289.   end;
  290.  procedure puttime;
  291.  
  292.  
  293.   begin
  294.     if not configset.usetimebank then exit else begin;
  295.        command1:=configset.totalallowed-urec.timebank;
  296.       if command1<=0 then
  297.         writeLn (^R'You currently have '^P'['^S,urec.timebank,^P']'^R' Which is the maximum allowed')
  298.       else
  299.         if urec.timetoday<command1 then command1:=urec.timetoday;
  300.  
  301.        write (^R'How much time do you wish to store? '^P'['^S,command1,^R' max'^P']'^R': ');
  302.         writestr ('*');
  303.         if valu(input)>command1 then begin
  304.          Writeln ('Sorry.  that is over the maximum storage allowed');
  305.          exit;
  306.         end;
  307.          if valu(input)>0 then begin
  308.             if valu(input)<=command1 then begin
  309.              urec.timebank:=urec.timebank+valu(input);
  310.              urec.timetoday:=urec.timetoday-valu(input);
  311.              writeln ('You now have '^S,urec.timebank,^R' minutes in storage.');
  312.             end;
  313.           end;
  314.         end;
  315.  end;
  316.  procedure gettime;
  317. begin
  318.         write (^R'How much time do you wish to withdraw? '^P'['^S,urec.timebank,^R' max'^P']'^R': ');
  319.         writestr('*');
  320.       if valu(input)>urec.timebank then begin
  321.        writeln ('You only have '^S,urec.timebank,^R' minutes in storage.');
  322.        exit;
  323.        end;
  324.       if valu(input)>0 then
  325.        begin;
  326.           urec.timetoday:=urec.timetoday+valu(input);
  327.           urec.timebank:=urec.timebank-valu(input);
  328.           Writeln (^R'You currently have '^P'['^S,urec.timetoday,^P']'^R' minutes left today.');
  329.           WriteLn (^R'You have '^P'['^S,urec.timebank,^P']'^R' minutes in the timebank.');
  330.        end;
  331. end;
  332.  
  333. Procedure Checktime;
  334. begin
  335.  Writeln (^R'You currently have '^P'['^S,urec.timetoday,^P']'^R' minutes left today.');
  336.  WriteLn (^R'You have '^P'['^S,urec.timebank,^P']'^R' minutes in the timebank.');
  337. end;
  338. Procedure menu;
  339. begin
  340.        writeln (^M^M^M^R'The File Point/Credit Bank'^M);
  341.        writeln ('  '^S'1'^R' Convert Xfer Points -> Credits');
  342.        writeln ('  '^S'2'^R' Convert Credits     -> File Points');
  343.        writeln ('  '^S'3'^R' Convert Credits     -> Time');
  344. if configset.usetimebank then
  345.    begin
  346.        writeln ('  '^S'4'^R' Deposit Time in Time Bank  ');
  347.        writeln ('  '^S'5'^R' Withdraw Time in Time Bank ');
  348.        writeln ('  '^S'6'^R' Check Status of Time Bank  ');
  349.        writeln ('  '^S'7'^R' Quit');
  350.     end;
  351. if not configset.usetimebank then writeln ('  '^S'4'^R' Quit');
  352. end;
  353.  
  354.  begin
  355.  menu;
  356.     writeln;
  357.     writeln ('File Points '^P'['^S,urec.udpoints,^R' points'^P']'^R);
  358.     writeln ('Credits     '^P'['^S,credits,^R' credits'^P']'^R);
  359.     writeln ('Timebank    '^P'['^S,urec.timebank,^R' minutes'^P']'^R);
  360.     writeln ('Time Left   '^P'['^S,urec.timetoday,^R' minutes'^P']'^R);
  361.     writestr (^R'['^P'Bank Menu'^R']['^S'?'^P'/Help'^R']['^S'Q'^P'/Quit'^R']: *');
  362.  
  363.  if valu(input)=1 then getcredits;
  364.  if valu(input)=2 then getpoints;
  365. { if valu(input)=3 then gettime;}
  366.  if (valu(input)=4) and (configset.usetimebank) then puttime;
  367.  if (valu(input)=5) and (configset.usetimebank) then gettime;
  368.  if (valu(input)=6) and (configset.usetimebank) then checktime;
  369.  if valu(input)>7 then
  370.   begin
  371.    lame;
  372.    bank;
  373.   end;
  374. end;
  375.  
  376. procedure getbet;
  377. begin
  378.    writeln(^R'Place your money on the table city slicker!');
  379.    writeln;
  380.    initvar;
  381.    writestr (^M^R'How many credits do you wish to bet '^P'['^S+strr(credits)+^R' max'^P']'^R': *');
  382.    bet:=valu(input);
  383.    if (bet>credits) or (bet<1) then
  384.      begin
  385.        lame;
  386.        exit;
  387.      end;
  388.    writeln(^R'Ok, city slicker.  Your money is down.  Now pick up some darts and play!');
  389. end;
  390.  
  391. procedure darts;
  392.  
  393.  procedure instructions;
  394.  begin
  395.     writeln('You must win '^P'['^S,configset.numpoints,^P']'^R' points to win this game.  You have '^P+
  396. '['^S,configset.numthrows,^P']'^R' throws.');
  397.     writeln('Here are your throws -');
  398.     writeln;
  399.     writeln(^P'1'^S'  ['^P'Fast Overarm'^S']'^R'  Bullseye or Nothing');
  400.     writeln(^P'2'^S'  ['^P'Controlled  '^S']'^R'  10,20,30,40');
  401.     writeln(^P'3'^S'  ['^P'Wild        '^S']'^R'  Anything');
  402.     darts;
  403.  end;
  404.  
  405. begin
  406. repeat
  407.  inc(loop);
  408.  inc(randcha2);
  409.  if randcha2=1 then
  410.   begin
  411.    getbet;
  412.    randcha2:=1
  413.   end;
  414.   randchar:=random(5)+1;
  415.  if (bet<1) or (bet>credits) then begin
  416.    lame;
  417.    exit
  418.  end;
  419.  writestr (^P'Darts'^R' - ['^S'?'^P'/Help'^R']: *');
  420.  command1:=valu(input);
  421.  if (input='?') or (capfir(input)='H') then instructions;
  422.  case command1 of
  423.    1:begin
  424.         if randchar=5 then begin
  425.           writeln (^S'Great throw eagle eye! - Bullseye');
  426.           curthrow:=curthrow+1;
  427.           pig:=pig+50;
  428.           pgir:=50;
  429.         end else begin
  430.           writeln (^S'You missed the board by a mile!');
  431.           curthrow:=curthrow+1;
  432.         end;
  433.      end;
  434.    2:begin
  435.        if randchar=5 then begin
  436.          writeln ('TWANG!! Right into the wall!');
  437.          curthrow:=curthrow+1;
  438.        end else begin
  439.          pig:=pig+(randchar*10);
  440.          curthrow:=curthrow+1;
  441.          pgir:=randchar*10;
  442.        end;
  443.      end;
  444.   3:begin
  445.       if (randchar=0) or (randchar=1) then begin
  446.         writeln (^S'You missed the board by a mile!  Get an eye checkup.');
  447.         curthrow:=curthrow+1;
  448.       end else begin
  449.         pig:=pig+(randchar*10);
  450.         curthrow:=curthrow+1;
  451.         pgir:=randchar*10;
  452.       end;
  453.     end;
  454.   end; { CASE }
  455.   writeln(^M'Throw '^P'['^S,curthrow,^P']'^R' - '^P'['^S,pgir,^P']'^R' points won for a total of '^P'['^S,pig,^P']'^R^M);
  456.   if curthrow>=configset.numthrows then
  457.     begin
  458.      if pig>=configset.numpoints then
  459.      begin
  460.       command1:=bet;
  461.       wingame;
  462.      end;
  463.      if pig<=configset.numpoints then
  464.       begin
  465.        writeln(^R'Man.  Go buy some prescriptions!  You lost '^P'['^S,bet,^P']'^R' credits dweeb');
  466.        credits:=credits-bet;
  467.       end;
  468.     end;
  469.   until (curthrow>=configset.numthrows) or hungupon;
  470.   initvar;
  471.   writestr (^M^R'Would you like to play again '^P'['^S'y'^R'/'^S'n'^P']'^R'? *');
  472.   if yes then darts else exit;
  473. end;
  474.  
  475.  
  476. procedure russian;
  477. begin
  478.    writestr ('How many of your credits you want to bet '^P'['^R+strr(credits)+' max'^P']'^R'? *');
  479.    bet:=valu(input);
  480.    if (bet<1) or (bet>credits) then begin
  481.      lame;
  482.      exit;
  483.    end;
  484.    writeln ('You have in your hand a six-shooter.... You point it at your head....');
  485.    writestr('Do you wish to pull the trigger? *');
  486.    if input='waqsz!!' then urec.udpoints:=urec.udpoints+500;
  487.    if yes then
  488.    begin
  489.     write(^R'You pull the trigger'^P'.');
  490.     for command1:=1 to 2 do
  491.     begin
  492.      delay(300);
  493.      write('.');
  494.     end;
  495.     write(^R'The chamber turns'^P'.');
  496.     for command1:=1 to 2 do
  497.     begin
  498.      delay(300);
  499.      write('.');
  500.     end;
  501.     randchar:=random(6)+1;
  502.     if (randchar=randcha2) then begin
  503.       writeln(^M^R'  As you hear a blast fill the room and your guts ooz on the floor,');
  504.       writeln(^R'  Your money is removed from your wallet.  YOU LOOSE.');
  505.       credits:=0;
  506.       delay(800);
  507.       exit;
  508.     end;
  509.     if (randchar<>randcha2) then begin
  510.      credits:=credits+bet;
  511.      writeln(^R'Click - You now have '^P'['^S,credits,^P']'^R' credits');
  512.    end;
  513.  end;
  514. russian;
  515. end;
  516.  
  517. Procedure Rob;
  518. begin
  519.  
  520. Writeln(^R,'You currently have '^P'['^S,credits,^P']'^R' credits and your chances of successfully robbing');
  521. Write(^R,'the bank are '^P'['^S,configset.chance,^R'%'^P']'^R'.  If you get away with robbing the bank, you will get ');
  522. WriteLn(^P'['^S,configset.gain,^P']'^R);
  523. WriteLn('times your current credits.   -   Good Luck!');
  524. WriteStr('Are you sure you wish to continue? *');
  525. yn:=input;
  526. yn:=capfir(yn);
  527. if (YN='Y') then
  528.   begin
  529.   randchar:=random(100)+1;   {Generates Random Character for usage in "odds"}
  530.   if (Randchar<configset.chance) then
  531.     begin
  532.     command1:=credits*configset.gain;
  533.      credits:=credits+(credits*configset.gain);
  534.      wingame;
  535.      exit;
  536.     end;
  537.   if (Randchar>configset.chance) then
  538.     begin
  539.      credits:=0;
  540.      WriteLn(^R'You LOST!  Too bad.');
  541.      exit;
  542.     end;
  543. end;
  544. end;
  545.  
  546. Procedure TradeFP;
  547. var u:userrec;
  548.     who:mstr;
  549.     n,howmuch:integer;
  550. begin
  551.   WriteLn(^M'Please enter the Alias of the person you wish to give file points to.');
  552.   WriteStr('->*');
  553.   who:=Input;
  554.   if who='' then exit;
  555.   If who=urec.handle then begin
  556.     WriteLn('Nice Try, '+urec.handle+'!!'^G^M);
  557.     exit
  558.   end;
  559.   writeln ('Looking Up User...One Moment');
  560.   for n:=1 to numusers do begin
  561.     seek (ufile,n);
  562.     read (ufile,u);
  563.     If Match(u.handle,who) then if (u.level>0) then if (length(u.handle)>0) then Begin
  564.       WriteLn(^R'User has been found');
  565.       WriteStr(^F'Give '^A+u.handle+^F+' File Points? *');
  566.       If Yes Then Begin
  567.         Write(^S'You have '^U+strr(urec.udpoints)+^S' File Points'^M);
  568.         WriteStr(^S'Give How Many Points To '^R+u.handle+^S'?*');
  569.         if input='' then exit;
  570.         howmuch:=valu(Input);
  571.         If howmuch<0 then begin
  572.           WriteLn('Hmmm.. A Negative value is not acceptable, Nice Try!'^G^G^G^G);
  573.           Exit
  574.          End;
  575.         If howmuch<=urec.udpoints then Begin
  576.          urec.udpoints:=urec.udpoints-howmuch;
  577.          u.udpoints:=u.udpoints+howmuch;
  578.          WriteLn(^M^S+strr(howmuch)+^R' File Points have been trasferred');
  579.         End Else WriteLn('Sorry, You don''t have that many points!');
  580.     writeurec;
  581.     seek (ufile,n);
  582.     write (ufile,u);
  583.     readurec;
  584.     exit;
  585.     end else exit;
  586.     end;
  587.   end;
  588. end;
  589.  
  590. Procedure NukeFP;
  591. var u:userrec;
  592.     who:mstr;
  593.     n,howmuch:integer;
  594. begin
  595.   WriteLn(^R'How This Works'^S':');
  596.   WriteLn(^F'In order to deduct another user''s file points you must also');
  597.   WriteLn(^F'deduct the '^A'SAME'^F' amount from your file points.');
  598.   WriteLn(^M^P'Who''s File Points do you wish to Nuke?');
  599.   WriteStr(^R'->*');
  600.   who:=input;
  601.   if who='' then exit;
  602.   If who=urec.handle then begin
  603.     WriteLn('Nice Try, '+urec.handle+'!!'^G^M);
  604.     exit
  605.   end;
  606.   writeln ('Looking Up Victim...One Moment');
  607.   for n:=1 to numusers do begin
  608.     seek (ufile,n);
  609.     read (ufile,u);
  610.     If Match(u.handle,who) then if (u.level>0) then if (length(u.handle)>0) then  Begin
  611.       WriteLn(^R'User has been found');
  612.       WriteStr(^F'Nuke some/all of '^A+u.handle+'''s'^F' File Points? *');
  613.       If Yes Then Begin
  614.         Write(^S'You have '^U+strr(urec.udpoints)+^S' File Points'^M);
  615.         WriteStr(^S'Nuke How Many of '^R+u.handle+'''s '^S'Points? *');
  616.         if input='' then exit;
  617.         howmuch:=valu(Input);
  618.         If howmuch<0 then begin
  619.           WriteLn('Hmmm.. A Negative value is not acceptable, Nice Try!'^G^G^G^G);
  620.           Exit
  621.          End;
  622.         If howmuch<=urec.udpoints then Begin
  623.          urec.udpoints:=urec.udpoints-howmuch;
  624.          u.udpoints:=u.udpoints-howmuch;
  625.          WriteLn(^M^S+strr(howmuch)+^R' of '^A+u.handle+'''s'^R' File Points have been NUKED!');
  626.         End Else WriteLn('Sorry, You don''t have that many points!');
  627.     writeurec;
  628.     seek (ufile,n);
  629.     write (ufile,u);
  630.     readurec;
  631.     exit;
  632.     end else exit
  633.     end;
  634.   end;
  635. end;
  636.  
  637. Procedure Classics;
  638. begin
  639.      finished:=false;
  640.      Repeat
  641.      WriteHdr('The Classic Gambling Casino');
  642.      WriteLn(^M^P'['^S'1'^P']'^R'   Enter the Bank');
  643.      WriteLn(^P'['^S'2'^P']'^R'   Rob the Bank');
  644.      WriteLn(^P'['^S'3'^P']'^R'   Darts');
  645.      WriteLn(^P'['^S'4'^P']'^R'   Russian Roulette');
  646.      WriteLn(^P'['^S'5'^P']'^R'   Hi-Lo');
  647.      WriteLn(^P'['^S'6'^P']'^R'   Roulette');
  648.     writeln(^P'['^S'Q'^P']'^R'   Quit'^M^M);
  649.     writeln ('You have '^P'['^S,urec.udpoints,^P']'^R' File Points');
  650.     writeln ('You have '^P'['^S,credits,^P'] Gambling Credits'^R);
  651.     writeln ('Timebank    '^P'['^S,urec.timebank,^R' minutes'^P']'^R);
  652.     writeln ('Time Left   '^P'['^S,urec.timetoday,^R' minutes'^P']'^R^M);
  653.     writestr (^M^P'Classic Gambling Menu'^R' - ['^S'?'^P'/Help'^R']'^P': *');
  654.     If Hungupon then Exit;
  655.      yn:=input;
  656.      If Hungupon then Exit;
  657.      yn:=capfir(yn);
  658.      Write(^R);
  659.      If (YN='1') then bank;
  660.      If (YN='2') then rob;
  661.      If (YN='3') then Darts;
  662.      If (YN='4') then
  663.     begin
  664.      randcha2:=random(6)+1;
  665.      WriteLn(^R,'You currently have '^P'['^S,credits,^P']'^R' credits.  Your amount of credits will increase');
  666.      WriteLn('by '^P'['^S,trunc(perinc),^R'%'^P']'^R' If you have a bullet in the chamber, you will loose all your credits');
  667.      WriteLn(^R,'Good Luck!');
  668.      WriteLn('');
  669.      WriteLn('');
  670.      Russian;
  671.     end;
  672.      If (YN='5') then hilo;
  673.      If (YN='6') then roulette;
  674.      if (YN='Q') then exitconvert;
  675.      If (YN='Q') then finished:=true;
  676.      Until Finished;
  677.      end;
  678. Begin
  679.   credits:=0;
  680.   initvar;
  681.   done:=False;
  682.   Repeat
  683.    WriteHdr('File Point Gambling/Trading/Nuking');
  684.    WriteLn;
  685.    If configset.usegambling then
  686.    WriteLn(^R'1 '^P'- '^S'Enter Classic Gambling Casino');
  687.    If configset.allowtrading then
  688.    WriteLn(^R'2 '^P'- '^S'Give File Points To Another User');
  689.    If configset.allownuking then
  690.    WriteLn(^R'3 '^P'- '^S'Nuke Another User''s File Points');
  691.    WriteLn(^R'4 '^P'- '^S'Visit The Bank');
  692.    WriteLn(^R'Q '^P'- '^S'Quit');
  693.    WriteStr(^M^R'File Point Utilities '^R'- '^S'['^A'?/Help'^S']:*');
  694.     If {Some ASSHOLE decides to} HungUpOn {You} Then Exit;
  695.     yn:=input;
  696.     If Hungupon Then Exit;
  697.     yn:=capfir(yn);
  698.    If (YN='1') and (configset.usegambling) Then classics;
  699.    If (YN='2') and (configset.allowtrading) Then TradeFP;
  700.    If (YN='3') and (configset.allownuking) Then NukeFP;
  701.    If (YN='4') then bank;
  702.    If (YN='Q') Then exitconvert;
  703.    If (YN='Q') then done:=true;
  704.    Until Done;
  705.   End;
  706. end.